#!/usr/bin/env python

import dbus
import os
import sys

os.environ['DBUS_SESSION_BUS_ADDRESS'] = 'unix:path=/var/run/dbus/system_bus_socket'

bus = dbus.SessionBus()
remote_object = bus.get_object("org.security.agent", "/org/security/agent/motion")
agent = dbus.Interface(remote_object, "org.security.agent")
try:
	print "param 1 = ", sys.argv[1]
	param1 = sys.argv[1]
	print "param 2 = ", sys.argv[2]
	param2 = sys.argv[2]
	agent.on_movie_start(param1,param2)
except:
	print "\nError in script\n"
